package yf.mall.enums;

import lombok.Getter;

import java.util.Arrays;

@Getter
public enum OrderItemStatusEnum {

    NO(0," 未评论")
    ,


    YES(1,"已评论"),

    ;


    int index;
    String value;

    public static String[] names(){
        return Arrays.stream(OrderItemStatusEnum.values()).map(m->m.getValue()).toArray(String[]::new);
    }

    OrderItemStatusEnum(int index,String value) {
        this.index = index;
        this.value = value;
    }

    public static String indexOf(int idx) {
        return OrderItemStatusEnum.values()[idx].getValue();
    }
}
